package com.sservice.banfu.service;

import com.sservice.banfu.e.SaleInfo;
import com.sservice.banfu.e.SalePerson;
import com.sservice.banfu.vo.SalePersonVo;
import com.sservice.base.entity.dto.ListResult;
import com.sservice.generator.service.Service;

import java.util.List;

/**
 * Created by byte_su@163.com on 2018/01/12.
 */
public interface SalePersonService1 extends Service<SalePerson> {

//    int deleteByPrimaryKey(Integer id);

//    int insert(SalePerson record);

//    int insertSelective(SalePerson record);

    /**
     * 详细信息
     *
     * @param id
     * @return
     */
    SalePersonVo selectByPrimaryKey(Integer id);

    /**
     * 基本信息
     *
     * @param id
     * @return
     */
    SalePerson selectBase(Integer id);

    SalePerson selectByPhone(SalePerson user);

//    int updateByPrimaryKeySelective(SalePerson record);
//
//    int updateByPrimaryKey(SalePerson record);

    List<SalePerson> queryByPage(SalePerson user);

    List<SalePerson> queryByUserIdAndPage(SalePerson user);

    int queryCount(SalePerson user);

    /***
     * 销售交易额数量
     * @param user
     * @return
     */
    int querySaleCashCount(SalePerson user);

    /**
     * 销售交易额分页
     *
     * @param user
     * @return
     */
    List<SalePerson> querySaleCashByPage(SalePerson user);

    /**
     * 详情
     * @param user
     * @return
     */
    SalePersonVo detail(SalePerson user);

    /**
     *  分页
     * @param user
     * @return
     */
    List<SalePersonVo> page(SalePersonVo user);

    SaleInfo selectByOpenId(String openid);

    /**
     * 销售经理分页查询
     *
     * @param sp
     * @return
     */
    List<SalePerson> querySaleManager(SalePersonVo sp);

    /**
     * 导师分页
     * @param sp
     * @return
     */
    ListResult queryTeacher(SalePersonVo sp);

    int querySaleManagerCount(SalePerson sp);

    /**
     * 统计
     * @param sp
     * @return
     */
    int count(SalePersonVo sp);
}
